home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNUC / GCC-281S.LZH / diffs-281c next >
Encoding:
Text File  |  1998-09-12  |  31.4 KB  |  1,033 lines

  1. diff -ur orig-2.8.1/c-lex.c gcc-2.8.1/c-lex.c
  2. --- orig-2.8.1/c-lex.c    Thu Feb 26 12:38:58 1998
  3. +++ gcc-2.8.1/c-lex.c    Mon Apr 27 19:58:32 1998
  4. @@ -366,12 +366,14 @@
  5.      case '\r':
  6.        /* ANSI C says the effects of a carriage return in a source file
  7.           are undefined.  */
  8. +#ifndef atarist /* but not on an atarist, though hopefully we should'nt see it */
  9.        if (pedantic && !newline_warning)
  10.          {
  11.            warning ("carriage return in source file");
  12.            warning ("(we only warn about the first carriage return)");
  13.            newline_warning = 1;
  14.          }
  15. +#endif
  16.        c = GETC();
  17.        break;
  18.  
  19. diff -ur orig-2.8.1/calls.c gcc-2.8.1/calls.c
  20. --- orig-2.8.1/calls.c    Wed Feb 11 13:53:56 1998
  21. +++ gcc-2.8.1/calls.c    Mon Apr 27 20:00:12 1998
  22. @@ -2338,6 +2338,11 @@
  23.    argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  24.    bzero ((char *) argvec, nargs * sizeof (struct arg));
  25.  
  26. +/* how would you do this RIGHT ?? fake a DECL node? dunno... */
  27. +#ifdef ENCODE_SECTION_INFO
  28. +  /* mark it as a function (to be in the text section that is) */
  29. +  SYMBOL_REF_FLAG (fun) = 1;
  30. +#endif
  31.  
  32.    INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun, 0);
  33.  
  34. @@ -2865,6 +2870,11 @@
  35.  
  36.    argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
  37.    bzero ((char *) argvec, (nargs + 1) * sizeof (struct arg));
  38. +
  39. +#ifdef ENCODE_SECTION_INFO
  40. +  /* mark it as a function (to be in the text section that is) */
  41. +  SYMBOL_REF_FLAG (fun) = 1;
  42. +#endif
  43.  
  44.    INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun, 0);
  45.  
  46. diff -ur orig-2.8.1/cccp.c gcc-2.8.1/cccp.c
  47. --- orig-2.8.1/cccp.c    Thu Feb 26 12:38:58 1998
  48. +++ gcc-2.8.1/cccp.c    Tue Aug 11 16:05:28 1998
  49. @@ -127,6 +127,11 @@
  50.  #define PRINTF_PROTO_2(ARGS) PRINTF_PROTO(ARGS, 2, 3)
  51.  #define PRINTF_PROTO_3(ARGS) PRINTF_PROTO(ARGS, 3, 4)
  52.  
  53. +#ifdef atarist
  54. +long _stksize = 1L;        /* use 1/4 of memory as stack */
  55. +#define read(fd,buf,size)    _text_read(fd,buf,size)    /* this version of read() delete the CRs! */
  56. +#endif
  57. +
  58.  /* VMS-specific definitions */
  59.  #ifdef VMS
  60.  #include <descrip.h>
  61. @@ -161,6 +166,9 @@
  62.  /* Find the largest host integer type and set its size and type.
  63.     Watch out: on some crazy hosts `long' is shorter than `int'.  */
  64.  
  65. +#ifdef atarist
  66. +#define HOST_WIDE_INT    long
  67. +#endif
  68.  #ifndef HOST_WIDE_INT
  69.  # if HAVE_INTTYPES_H
  70.  #  include <inttypes.h>
  71. @@ -495,10 +503,9 @@
  72.    = INCLUDE_DEFAULTS;
  73.  #else
  74.    = {
  75. -    /* Pick up GNU C++ specific include files.  */
  76. -    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
  77. -    { OLD_GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 },
  78.  #ifdef CROSS_COMPILE
  79. +    /* for cross GNU C++ specific include files.  */
  80. +    { TOOL_INCLUDE_DIR"/g++", 1, 1 },
  81.      /* This is the dir for fixincludes.  Put it just before
  82.         the files that we fix.  */
  83.      { GCC_INCLUDE_DIR, "GCC", 0, 0 },
  84. @@ -510,6 +517,9 @@
  85.      { TOOL_INCLUDE_DIR, "BINUTILS", 0, 0 },
  86.  #endif
  87.  #else /* not CROSS_COMPILE */
  88. +    /* Pick up GNU C++ specific include files.  */
  89. +    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
  90. +    { OLD_GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 },
  91.  #ifdef LOCAL_INCLUDE_DIR
  92.      /* This should be /usr/local/include and should come before
  93.         the fixincludes-fixed header files.  */
  94. @@ -1567,7 +1577,11 @@
  95.      break;
  96.  
  97.        case 'v':
  98. +#ifdef atarist
  99. +    fprintf (stderr, "GNU CPP version %s.%s", version_string, ATARI_PL);
  100. +#else
  101.      fprintf (stderr, "GNU CPP version %s", version_string);
  102. +#endif
  103.  #ifdef TARGET_VERSION
  104.      TARGET_VERSION;
  105.  #endif
  106. @@ -1694,6 +1708,7 @@
  107.      }
  108.    }
  109.  
  110. +#ifndef atarist
  111.    /* Add dirs from CPATH after dirs from -I.  */
  112.    /* There seems to be confusion about what CPATH should do,
  113.       so for the moment it is not documented.  */
  114. @@ -1703,6 +1718,7 @@
  115.    cp = getenv ("CPATH");
  116.    if (cp && ! no_standard_includes)
  117.      path_include (cp);
  118. +#endif
  119.  
  120.    /* Initialize output buffer */
  121.  
  122. @@ -1826,9 +1842,17 @@
  123.      switch ((objc << 1) + cplusplus)
  124.        {
  125.        case 0:
  126. +#ifdef atarist
  127. +    epath = getenv("GNUINC");
  128. +    if (epath == NULL)
  129. +#endif
  130.      epath = getenv ("C_INCLUDE_PATH");
  131.      break;
  132.        case 1:
  133. +#ifdef atarist
  134. +    epath = getenv("GXXINC");
  135. +    if (epath == NULL)
  136. +#endif
  137.      epath = getenv ("CPLUS_INCLUDE_PATH");
  138.      break;
  139.        case 2:
  140. @@ -2208,6 +2232,7 @@
  141.    return 0;
  142.  }
  143.  
  144. +#ifndef atarist
  145.  /* Given a colon-separated list of file names PATH,
  146.     add all the names to the search path for include files.  */
  147.  
  148. @@ -2241,6 +2266,7 @@
  149.      break;
  150.      }
  151.  }
  152. +#endif /*atarist */
  153.  
  154.  /* Return the address of the first character in S that equals C.
  155.     S is an array of length N, possibly containing '\0's, and followed by '\0'.
  156. @@ -3889,7 +3915,10 @@
  157.          = skip_quoted_string (xp - 1, bp, ip->lineno,
  158.                        NULL_PTR, NULL_PTR, NULL_PTR);
  159.            while (xp != bp1)
  160. -        *cp++ = *xp++;
  161. +        if (*xp == '\\' && xp + 1 != bp1 && xp[1] == '\n')
  162. +            xp += 2;
  163. +        else
  164. +            *cp++ = *xp++;
  165.          }
  166.          break;
  167.  
  168. @@ -4646,7 +4675,7 @@
  169.  absolute_filename (filename)
  170.       char *filename;
  171.  {
  172. -#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN32__))
  173. +#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN32__)) || (defined (atarist))
  174.    if (isalpha (filename[0]) && filename[1] == ':') filename += 2;
  175.  #endif
  176.  #if defined (__CYGWIN32__)
  177. diff -ur orig-2.8.1/cexp.y gcc-2.8.1/cexp.y
  178. --- orig-2.8.1/cexp.y    Wed Feb 18 19:48:42 1998
  179. +++ gcc-2.8.1/cexp.y    Wed Jun 17 16:25:08 1998
  180. @@ -79,6 +79,10 @@
  181.  /* Find the largest host integer type and set its size and type.
  182.     Watch out: on some crazy hosts `long' is shorter than `int'.  */
  183.  
  184. +#ifdef atarist
  185. +#define HOST_WIDE_INT long
  186. +#endif
  187. +
  188.  #ifndef HOST_WIDE_INT
  189.  # if HAVE_INTTYPES_H
  190.  #  include <inttypes.h>
  191. diff -ur orig-2.8.1/choose-temp.c gcc-2.8.1/choose-temp.c
  192. --- orig-2.8.1/choose-temp.c    Thu Dec  4 14:17:56 1997
  193. +++ gcc-2.8.1/choose-temp.c    Fri Jul 17 10:21:10 1998
  194. @@ -123,6 +123,30 @@
  195.    base = ":";
  196.  #endif
  197.  
  198. +#ifdef atarist
  199. +    if (base[1] == ':')            /* TOS path like c:\tmp */
  200. +    {
  201. +        char    *p;
  202. +        
  203. +        p = base;
  204. +        while (*p != EOS)            /* convert it to c:/tmp */
  205. +        {
  206. +            if (*p == '\\')
  207. +                *p = '/';
  208. +            p++;
  209. +        }
  210. +        p--;
  211. +        if (*p == '/')                /* deleting trailing '/' , e.g from c:/ */
  212. +            *p = EOS;
  213. +    }
  214. +#if 0
  215. +{
  216. +    char *newbase = alloca(FILENAME_MAX);
  217. +   dos2unx(base, newbase);
  218. +   base = newbase;
  219. +}
  220. +#endif
  221. +#endif
  222.    len = strlen (base);
  223.    temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
  224.                 + strlen (TEMP_FILE) + 1);
  225. diff -ur orig-2.8.1/config/m68k/m68k.c gcc-2.8.1/config/m68k/m68k.c
  226. --- orig-2.8.1/config/m68k/m68k.c    Fri Nov 21 10:53:06 1997
  227. +++ gcc-2.8.1/config/m68k/m68k.c    Mon Apr 27 19:03:48 1998
  228. @@ -133,7 +133,7 @@
  229.  void
  230.  finalize_pic ()
  231.  {
  232. -  if (flag_pic && current_function_uses_pic_offset_table)
  233. +  if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
  234.      {
  235.        rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx);
  236.        emit_insn_after (insn, get_insns ());
  237. @@ -473,7 +473,7 @@
  238.                    -cfa_store_offset + n_regs++ * 4);
  239.      }
  240.      }
  241. -  if (flag_pic && current_function_uses_pic_offset_table)
  242. +  if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
  243.      {
  244.  #ifdef MOTOROLA
  245.        asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
  246. @@ -1305,12 +1305,20 @@
  247.    /* First handle a simple SYMBOL_REF or LABEL_REF */
  248.    if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  249.      {
  250. +#ifdef LEGITIMATE_BASEREL_OPERAND_P
  251. +      if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  252. +    return orig;
  253. +#endif
  254. +
  255.        if (reg == 0)
  256.      abort ();
  257.  
  258. -      pic_ref = gen_rtx (MEM, Pmode,
  259. -             gen_rtx (PLUS, Pmode,
  260. -                  pic_offset_table_rtx, orig));
  261. +      if (flag_pic == 3)
  262. +        pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  263. +      else
  264. +        pic_ref = gen_rtx (MEM, Pmode,
  265. +               gen_rtx (PLUS, Pmode,
  266. +                    pic_offset_table_rtx, orig));
  267.        current_function_uses_pic_offset_table = 1;
  268.        if (reload_in_progress)
  269.      regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
  270. @@ -2778,6 +2786,9 @@
  271.        output_address (XEXP (op, 0));
  272.        if (letter == 'd' && ! TARGET_68020
  273.        && CONSTANT_ADDRESS_P (XEXP (op, 0))
  274. +      && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
  275. +           && SYMBOL_REF_FLAG (XEXP (op, 0))
  276. +           && !SYMBOL_REF_USED (XEXP (op, 0)))
  277.        && !(GET_CODE (XEXP (op, 0)) == CONST_INT
  278.             && INTVAL (XEXP (op, 0)) < 0x8000
  279.             && INTVAL (XEXP (op, 0)) >= -0x8000))
  280. @@ -3071,6 +3082,8 @@
  281.                fprintf (file, ":w");
  282.              if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  283.                fprintf (file, ":l");
  284. +            if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  285. +              fprintf (file, ":w");
  286.            }
  287.          if (addr != 0 && ireg != 0)
  288.            {
  289. @@ -3135,6 +3148,18 @@
  290.          fprintf (file, "%d:w", INTVAL (addr));
  291.  #endif
  292.        }
  293. +    else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
  294. +         && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
  295. +      {
  296. +#ifdef MOTOROLA
  297. +        output_addr_const (file, addr);
  298. +        fputs ("(pc)", file);
  299. +#else
  300. +        fputs ("pc@(", file);
  301. +        output_addr_const (file, addr);
  302. +        putc (')', file);
  303. +#endif
  304. +      }
  305.      else
  306.        {
  307.          output_addr_const (file, addr);
  308. @@ -3201,6 +3226,22 @@
  309.  
  310.    return 0;
  311.  }
  312. +
  313. +#ifdef ENCODE_SECTION_INFO
  314. +/* Does operand (which is a symbolic_operand) live in text space? If
  315. +   so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
  316. +
  317. +int
  318. +read_only_operand (operand)
  319. +     rtx operand;
  320. +{
  321. +  if (GET_CODE (operand) == CONST)
  322. +    operand = XEXP (XEXP (operand, 0), 0);
  323. +  if (GET_CODE (operand) == SYMBOL_REF)
  324. +    return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  325. +  return 1;
  326. +}
  327. +#endif
  328.  
  329.  /* Accept integer operands in the range 0..0xffffffff.  We have to check the
  330.     range carefully since this predicate is used in DImode contexts.  Also, we
  331. diff -ur orig-2.8.1/config/m68k/m68k.h gcc-2.8.1/config/m68k/m68k.h
  332. --- orig-2.8.1/config/m68k/m68k.h    Thu Feb 19 23:23:52 1998
  333. +++ gcc-2.8.1/config/m68k/m68k.h    Mon Apr 27 19:10:50 1998
  334. @@ -112,6 +112,14 @@
  335.  #define MASK_5200    2048
  336.  #define TARGET_5200 (target_flags & MASK_5200)
  337.  
  338. +/* Use PC-relative addressing for refs to read-only data */
  339. +#define MASK_PCREL 4096
  340. +#define TARGET_PC_REL (target_flags & MASK_PCREL)
  341. +
  342. +/* Use base-relative addressing for refs to data&bss segments */
  343. +#define MASK_BASEREL 8192
  344. +#define TARGET_BASE_REL (target_flags & MASK_BASEREL)
  345. +
  346.  /* Align ints to a word boundary.  This breaks compatibility with the 
  347.     published ABI's for structures containing ints, but produces faster
  348.     code on cpus with 32 bit busses (020, 030, 040, 060, CPU32+, coldfire).
  349. @@ -424,7 +432,18 @@
  350.     the compiler won't touch since no instructions that use these
  351.     registers will be valid.  */
  352.  
  353. -#ifdef SUPPORT_SUN_FPA
  354. +#ifndef SUPPORT_SUN_FPA
  355. +
  356. +#define CONDITIONAL_REGISTER_USAGE \
  357. +{                                               \
  358. +  if (flag_pic)                                 \
  359. +    fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  360. +  /* prevent saving/restoring of the base reg */ \
  361. +  if (flag_pic == 3)                 \
  362. +    call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  363. +}
  364. +
  365. +#else  /* defined SUPPORT_SUN_FPA */
  366.  
  367.  #define CONDITIONAL_REGISTER_USAGE \
  368.  {                         \
  369. @@ -1415,6 +1434,8 @@
  370.         && GET_CODE (XEXP (X, 1)) == CONST_INT                \
  371.         && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)        \
  372.     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  373. +       && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1)))        \
  374. +   || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  375.         && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)        \
  376.     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  377.         && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))        \
  378. @@ -1481,7 +1502,8 @@
  379.  #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                \
  380.  { GO_IF_NONINDEXED_ADDRESS (X, ADDR);                    \
  381.    GO_IF_INDEXED_ADDRESS (X, ADDR);                    \
  382. -  if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS    \
  383. +  if (flag_pic && flag_pic != 3                        \
  384. +      && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS        \
  385.        && LEGITIMATE_INDEX_P (XEXP (X, 0))                \
  386.        && GET_CODE (XEXP (X, 1)) == LABEL_REF)                \
  387.      goto ADDR; }
  388. diff -ur orig-2.8.1/config/m68k/m68k.md gcc-2.8.1/config/m68k/m68k.md
  389. --- orig-2.8.1/config/m68k/m68k.md    Tue Oct 28 20:31:34 1997
  390. +++ gcc-2.8.1/config/m68k/m68k.md    Mon Apr 27 19:21:16 1998
  391. @@ -503,6 +503,9 @@
  392.  {
  393.    m68k_last_compare_had_fp_operands = 0;
  394.    if (flag_pic && symbolic_operand (operands[1], SImode))
  395. +#ifdef LEGITIMATE_BASEREL_OPERAND_P
  396. +   if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  397. +#endif
  398.      {
  399.        /* The source is an address which requires PIC relocation.
  400.           Call legitimize_pic_address with the source, mode, and a relocation
  401. @@ -4506,7 +4509,7 @@
  402.  (define_insn "ashlsi3"
  403.    [(set (match_operand:SI 0 "register_operand" "=d")
  404.      (ashift:SI (match_operand:SI 1 "register_operand" "0")
  405. -           (match_operand:SI 2 "general_operand" "dI")))]
  406. +           (match_operand:QI 2 "general_operand" "dI")))]
  407.    ""
  408.    "*
  409.  {
  410. @@ -4521,14 +4524,14 @@
  411.  (define_insn "ashlhi3"
  412.    [(set (match_operand:HI 0 "register_operand" "=d")
  413.      (ashift:HI (match_operand:HI 1 "register_operand" "0")
  414. -           (match_operand:HI 2 "general_operand" "dI")))]
  415. +           (match_operand:QI 2 "general_operand" "dI")))]
  416.    "!TARGET_5200"
  417.    "lsl%.w %2,%0")
  418.  
  419.  (define_insn ""
  420.    [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
  421.      (ashift:HI (match_dup 0)
  422. -           (match_operand:HI 1 "general_operand" "dI")))]
  423. +           (match_operand:QI 1 "general_operand" "dI")))]
  424.    "!TARGET_5200"
  425.    "lsl%.w %1,%0")
  426.  
  427. @@ -4685,21 +4688,21 @@
  428.  (define_insn "ashrsi3"
  429.    [(set (match_operand:SI 0 "register_operand" "=d")
  430.      (ashiftrt:SI (match_operand:SI 1 "register_operand" "0")
  431. -             (match_operand:SI 2 "general_operand" "dI")))]
  432. +             (match_operand:QI 2 "general_operand" "dI")))]
  433.    ""
  434.    "asr%.l %2,%0")
  435.  
  436.  (define_insn "ashrhi3"
  437.    [(set (match_operand:HI 0 "register_operand" "=d")
  438.      (ashiftrt:HI (match_operand:HI 1 "register_operand" "0")
  439. -             (match_operand:HI 2 "general_operand" "dI")))]
  440. +             (match_operand:QI 2 "general_operand" "dI")))]
  441.    "!TARGET_5200"
  442.    "asr%.w %2,%0")
  443.  
  444.  (define_insn ""
  445.    [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
  446.      (ashiftrt:HI (match_dup 0)
  447. -             (match_operand:HI 1 "general_operand" "dI")))]
  448. +             (match_operand:QI 1 "general_operand" "dI")))]
  449.    "!TARGET_5200"
  450.    "asr%.w %1,%0")
  451.  
  452. @@ -4871,21 +4874,21 @@
  453.  (define_insn "lshrsi3"
  454.    [(set (match_operand:SI 0 "register_operand" "=d")
  455.      (lshiftrt:SI (match_operand:SI 1 "register_operand" "0")
  456. -             (match_operand:SI 2 "general_operand" "dI")))]
  457. +             (match_operand:QI 2 "general_operand" "dI")))]
  458.    ""
  459.    "lsr%.l %2,%0")
  460.  
  461.  (define_insn "lshrhi3"
  462.    [(set (match_operand:HI 0 "register_operand" "=d")
  463.      (lshiftrt:HI (match_operand:HI 1 "register_operand" "0")
  464. -             (match_operand:HI 2 "general_operand" "dI")))]
  465. +             (match_operand:QI 2 "general_operand" "dI")))]
  466.    "!TARGET_5200"
  467.    "lsr%.w %2,%0")
  468.  
  469.  (define_insn ""
  470.    [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
  471.      (lshiftrt:HI (match_dup 0)
  472. -             (match_operand:HI 1 "general_operand" "dI")))]
  473. +             (match_operand:QI 1 "general_operand" "dI")))]
  474.    "!TARGET_5200"
  475.    "lsr%.w %1,%0")
  476.  
  477. @@ -4908,7 +4911,8 @@
  478.  (define_insn "rotlsi3"
  479.    [(set (match_operand:SI 0 "register_operand" "=d")
  480.      (rotate:SI (match_operand:SI 1 "register_operand" "0")
  481. -           (match_operand:SI 2 "general_operand" "dINO")))]
  482. +/*           (match_operand:SI 2 "general_operand" "dINO")))]*/
  483. +           (match_operand:QI 2 "general_operand" "dI")))]
  484.    "!TARGET_5200"
  485.    "*
  486.  {
  487. @@ -4926,7 +4930,8 @@
  488.  (define_insn "rotlhi3"
  489.    [(set (match_operand:HI 0 "register_operand" "=d")
  490.      (rotate:HI (match_operand:HI 1 "register_operand" "0")
  491. -           (match_operand:HI 2 "general_operand" "dIP")))]
  492. +/*           (match_operand:HI 2 "general_operand" "dIP")))] */
  493. +           (match_operand:QI 2 "general_operand" "dI")))]
  494.    "!TARGET_5200"
  495.    "*
  496.  {
  497. @@ -4942,7 +4947,8 @@
  498.  (define_insn ""
  499.    [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
  500.      (rotate:HI (match_dup 0)
  501. -           (match_operand:HI 1 "general_operand" "dIP")))]
  502. +/*           (match_operand:HI 1 "general_operand" "dIP")))] */
  503. +           (match_operand:QI 1 "general_operand" "dI")))]
  504.    "!TARGET_5200"
  505.    "*
  506.  {
  507. @@ -4990,21 +4996,21 @@
  508.  (define_insn "rotrsi3"
  509.    [(set (match_operand:SI 0 "register_operand" "=d")
  510.      (rotatert:SI (match_operand:SI 1 "register_operand" "0")
  511. -             (match_operand:SI 2 "general_operand" "dI")))]
  512. +             (match_operand:QI 2 "general_operand" "dI")))]
  513.    "!TARGET_5200"
  514.    "ror%.l %2,%0")
  515.  
  516.  (define_insn "rotrhi3"
  517.    [(set (match_operand:HI 0 "register_operand" "=d")
  518.      (rotatert:HI (match_operand:HI 1 "register_operand" "0")
  519. -             (match_operand:HI 2 "general_operand" "dI")))]
  520. +             (match_operand:QI 2 "general_operand" "dI")))]
  521.    "!TARGET_5200"
  522.    "ror%.w %2,%0")
  523.  
  524.  (define_insn ""
  525.    [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
  526.      (rotatert:HI (match_dup 0)
  527. -             (match_operand:HI 1 "general_operand" "dI")))]
  528. +             (match_operand:QI 1 "general_operand" "dI")))]
  529.    "!TARGET_5200"
  530.    "ror%.w %1,%0")
  531.  
  532. @@ -5815,9 +5821,13 @@
  533.    if (! ADDRESS_REG_P (operands[0]))
  534.      {
  535.  #ifdef MOTOROLA
  536. -      return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\";
  537. +#ifdef SGS_CMP_ORDER
  538. +    return \"cmp%.w %0,%#0\;jbne %l1\;cmp%.w %3,%#0\;jbne %l1\";
  539. +#else
  540. +    return \"cmp%.w %#0,%0\;jbne %l1\;cmp%.w %#0,%3\;jbne %l1\";
  541. +#endif
  542.  #else
  543. -      return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\";
  544. +    return \"cmp%.w %#0,%0\;jne %l1\;cmp%.w %#0,%3\;jne %l1\";
  545.  #endif
  546.      }
  547.    operands[4] = gen_label_rtx();
  548. @@ -6651,7 +6661,7 @@
  549.    ""
  550.    "
  551.  {
  552. -  if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  553. +  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  554.      SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  555.  }")
  556.  
  557. @@ -6661,7 +6671,7 @@
  558.       (match_operand:SI 1 "general_operand" "g"))]
  559.    ;; Operand 1 not really used on the m68000.
  560.  
  561. -  "! flag_pic"
  562. +  "! flag_pic || flag_pic == 3"
  563.    "*
  564.  #if defined (MOTOROLA) && !defined (USE_GAS)
  565.  #ifdef MOTOROLA_BSR
  566. @@ -6681,7 +6691,7 @@
  567.       (match_operand:SI 1 "general_operand" "g"))]
  568.    ;; Operand 1 not really used on the m68000.
  569.  
  570. -  "flag_pic"
  571. +  "flag_pic && flag_pic < 3"
  572.    "*
  573.    if (GET_CODE (operands[0]) == MEM
  574.        && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  575. @@ -6714,7 +6724,7 @@
  576.    ""
  577.    "
  578.  {
  579. -  if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  580. +  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  581.      SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  582.  }")
  583.  
  584. @@ -6724,7 +6734,7 @@
  585.      (call (match_operand:QI 1 "memory_operand" "o")
  586.            (match_operand:SI 2 "general_operand" "g")))]
  587.    ;; Operand 2 not really used on the m68000.
  588. -  "! flag_pic"
  589. +  "! flag_pic || flag_pic == 3"
  590.    "*
  591.  #if defined (MOTOROLA) && !defined (USE_GAS)
  592.  #ifdef MOTOROLA_BSR
  593. @@ -6744,7 +6754,7 @@
  594.      (call (match_operand:QI 1 "memory_operand" "o")
  595.            (match_operand:SI 2 "general_operand" "g")))]
  596.    ;; Operand 2 not really used on the m68000.
  597. -  "flag_pic"
  598. +  "flag_pic && flag_pic < 3"
  599.    "*
  600.    if (GET_CODE (operands[1]) == MEM
  601.        && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  602. @@ -7105,6 +7115,52 @@
  603.        (if_then_else
  604.          (ge (plus:SI (match_operand:SI 0 "register_operand" "+d")
  605.                   (const_int -1))
  606. +            (const_int 0))
  607. +        (label_ref (match_operand 1 "" ""))
  608. +        (pc)))
  609. +     (set (match_dup 0)
  610. +      (plus:SI (match_dup 0)
  611. +           (const_int -1)))])]
  612. +  "DATA_REG_P (operands[0])"
  613. +  "*
  614. +{
  615. +  CC_STATUS_INIT;
  616. +  output_dbcc_and_branch (operands);
  617. +  return \"\";
  618. +}")
  619. +
  620. +(define_peephole
  621. +  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
  622. +                             [(cc0) (const_int 0)])
  623. +                           (label_ref (match_operand 2 "" ""))
  624. +                           (pc)))
  625. +   (parallel
  626. +    [(set (pc)
  627. +      (if_then_else
  628. +        (ne (match_operand:HI 0 "register_operand" "+d")
  629. +            (const_int 0))
  630. +        (label_ref (match_operand 1 "" ""))
  631. +        (pc)))
  632. +     (set (match_dup 0)
  633. +      (plus:HI (match_dup 0)
  634. +           (const_int -1)))])]
  635. +  "DATA_REG_P (operands[0])"
  636. +  "*
  637. +{
  638. +  CC_STATUS_INIT;
  639. +  output_dbcc_and_branch (operands);
  640. +  return \"\";
  641. +}")
  642. +
  643. +(define_peephole
  644. +  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
  645. +                             [(cc0) (const_int 0)])
  646. +                           (label_ref (match_operand 2 "" ""))
  647. +                           (pc)))
  648. +   (parallel
  649. +    [(set (pc)
  650. +      (if_then_else
  651. +        (ne (match_operand:SI 0 "register_operand" "+d")
  652.              (const_int 0))
  653.          (label_ref (match_operand 1 "" ""))
  654.          (pc)))
  655. diff -ur orig-2.8.1/config.guess gcc-2.8.1/config.guess
  656. --- orig-2.8.1/config.guess    Tue Feb  3 18:27:42 1998
  657. +++ gcc-2.8.1/config.guess    Sat May 23 17:38:02 1998
  658. @@ -189,6 +189,9 @@
  659.      aushp:SunOS:*:*)
  660.      echo sparc-auspex-sunos${UNAME_RELEASE}
  661.      exit 0 ;;
  662. +    *atari*:*MiNT*:*:*)
  663. +    echo m68k-atari-mint
  664. +    exit 0 ;;
  665.      atari*:NetBSD:*:*)
  666.      echo m68k-atari-netbsd${UNAME_RELEASE}
  667.      exit 0 ;;
  668. diff -ur orig-2.8.1/config.sub gcc-2.8.1/config.sub
  669. --- orig-2.8.1/config.sub    Fri Feb 13 12:16:06 1998
  670. +++ gcc-2.8.1/config.sub    Mon Apr 27 19:24:26 1998
  671. @@ -221,6 +221,9 @@
  672.          basic_machine=m68k-apollo
  673.          os=-sysv
  674.          ;;
  675. +    atari)
  676. +        basic_machine=m68k-atari
  677. +        ;;
  678.      aux)
  679.          basic_machine=m68k-apple
  680.          os=-aux
  681. @@ -394,6 +397,10 @@
  682.      miniframe)
  683.          basic_machine=m68000-convergent
  684.          ;;
  685. +    mint)
  686. +        basic_machine=m68k-atari
  687. +        os=-mint
  688. +        ;;
  689.      mipsel*-linux*)
  690.          basic_machine=mipsel-unknown
  691.          os=-linux-gnu
  692. @@ -714,7 +721,7 @@
  693.            | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  694.            | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  695.            | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  696. -          | -mingw32* | -linux-gnu* | -uxpv*)
  697. +          | -mingw32* | -linux-gnu* | -uxpv* | -mint* )
  698.      # Remember, each alternative MUST END IN *, to match a version number.
  699.          ;;
  700.      -linux*)
  701. @@ -931,6 +938,9 @@
  702.                  ;;
  703.              -genix*)
  704.                  vendor=ns
  705. +                ;;
  706. +            -mint*)
  707. +                vendor=atari
  708.                  ;;
  709.              -mvs*)
  710.                  vendor=ibm
  711. diff -ur orig-2.8.1/configure gcc-2.8.1/configure
  712. --- orig-2.8.1/configure    Sun Mar  1 02:02:02 1998
  713. +++ gcc-2.8.1/configure    Mon Apr 27 19:25:22 1998
  714. @@ -3722,6 +3722,17 @@
  715.              exit 1
  716.          fi
  717.          extra_headers=math-68881.h
  718. +        ;;
  719. +    m68k-atari-mint* | m68000-atari-mint*)    # Atari ST running MiNT
  720. +        tm_file=m68k/mint.h
  721. +        xm_file=m68k/xm-mint.h
  722. +        tmake_file=m68k/t-mint
  723. +        xmake_file=m68k/x-mint
  724. +        fixincludes=Makefile.in
  725. +        install_headers_dir=install-headers-tar
  726. +        case $machine in
  727. +          m68000-*-*) target_cpu_default=0 ;;
  728. +        esac
  729.              ;;
  730.      m68k-bull-sysv*)        # Bull DPX/2
  731.          if [ x$gas = xyes ]
  732. diff -ur orig-2.8.1/cp/lang-specs.h gcc-2.8.1/cp/lang-specs.h
  733. --- orig-2.8.1/cp/lang-specs.h    Tue Nov 18 08:17:48 1997
  734. +++ gcc-2.8.1/cp/lang-specs.h    Mon Apr 27 19:26:18 1998
  735. @@ -44,7 +44,7 @@
  736.                  %{f*} %{+e*} %{aux-info*}\
  737.                  %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  738.                  %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
  739. -              %{!S:as %a %Y\
  740. +             %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  741.                %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  742.                        %{!pipe:%g.s} %A\n }}}}"},
  743.    {".ii", "@c++-cpp-output"},
  744. @@ -55,6 +55,6 @@
  745.                  %{f*} %{+e*} %{aux-info*}\
  746.                  %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  747.                  %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  748. -                %{!S:as %a %Y\
  749. +             %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  750.                  %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  751.                  %{!pipe:%g.s} %A\n }}}}"},
  752. diff -ur orig-2.8.1/cp/tree.c gcc-2.8.1/cp/tree.c
  753. --- orig-2.8.1/cp/tree.c    Tue Feb  3 19:32:44 1998
  754. +++ gcc-2.8.1/cp/tree.c    Mon Apr 27 19:27:34 1998
  755. @@ -1673,6 +1673,7 @@
  756.  #endif
  757.  }
  758.  
  759. +#ifndef atarist
  760.  /* This is used by the `assert' macro.  It is provided in libgcc.a,
  761.     which `cc' doesn't know how to link.  Note that the C++ front-end
  762.     no longer actually uses the `assert' macro (instead, it calls
  763. @@ -1696,6 +1697,7 @@
  764.    fflush (stderr);
  765.    abort ();
  766.  }
  767. +#endif
  768.  
  769.  /* Return, as an INTEGER_CST node, the number of elements for TYPE
  770.     (which is an ARRAY_TYPE).  This counts only elements of the top
  771. diff -ur orig-2.8.1/dbxout.c gcc-2.8.1/dbxout.c
  772. --- orig-2.8.1/dbxout.c    Thu Oct 23 12:03:02 1997
  773. +++ gcc-2.8.1/dbxout.c    Mon Apr 27 19:28:32 1998
  774. @@ -464,6 +464,10 @@
  775.       and output them all, except for those already output.  */
  776.  
  777.    dbxout_typedefs (syms);
  778. +
  779. +  /* Make sure that gdb extensions, if desired, are used immediately for C++. */
  780. +  if (use_gnu_debug_info_extensions && strcmp (lang_identify (), "cplusplus") == 0)
  781. +    have_used_extensions = 1;
  782.  }
  783.  
  784.  /* Output any typedef names for types described by TYPE_DECLs in SYMS,
  785. diff -ur orig-2.8.1/gcc.c gcc-2.8.1/gcc.c
  786. --- orig-2.8.1/gcc.c    Sat Feb 28 20:58:16 1998
  787. +++ gcc-2.8.1/gcc.c    Tue Aug 11 16:07:22 1998
  788. @@ -108,7 +108,9 @@
  789.  
  790.  /* By default there is no special suffix for executables.  */
  791.  #ifdef EXECUTABLE_SUFFIX
  792. +#ifndef atarist            /* do not append '.ttp' to the link name by default */
  793.  #define HAVE_EXECUTABLE_SUFFIX
  794. +#endif
  795.  #else
  796.  #define EXECUTABLE_SUFFIX ""
  797.  #endif
  798. @@ -279,6 +281,12 @@
  799.  void fancy_abort ();
  800.  char *xmalloc ();
  801.  char *xrealloc ();
  802. +
  803. +#ifdef atarist
  804. +#define read(fd,buf,size) \
  805. +        _text_read(fd,buf,size)        /* this version of read() delete the CRs! */
  806. +#endif
  807. +
  808.  
  809.  /* Specs are strings containing lines, each of which (if not blank)
  810.  is made up of a program name, and arguments separated by spaces.
  811. @@ -612,7 +620,7 @@
  812.             %{aux-info*}\
  813.             %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  814.             %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  815. -              %{!S:as %a %Y\
  816. +            %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  817.                %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  818.                        %{!pipe:%g.s} %A\n }}}}"},
  819.    {"-",
  820. @@ -647,7 +655,7 @@
  821.             %{aux-info*}\
  822.             %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  823.             %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  824. -              %{!S:as %a %Y\
  825. +            %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  826.                %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  827.                        %{!pipe:%g.s} %A\n }}}}"},
  828.    {".h", "@c-header"},
  829. @@ -671,12 +679,12 @@
  830.              %{aux-info*}\
  831.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  832.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  833. -             %{!S:as %a %Y\
  834. +          %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  835.                   %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  836.                   %{!pipe:%g.s} %A\n }}}}"},
  837.    {".s", "@assembler"},
  838.    {"@assembler",
  839. -   "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
  840. +   "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  841.                      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  842.                  %i %A\n }}}}"},
  843.    {".S", "@assembler-with-cpp"},
  844. @@ -689,7 +697,7 @@
  845.          %{traditional-cpp:-traditional}\
  846.      %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
  847.          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
  848. -   "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
  849. +   "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  850.                      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
  851.              %{!pipe:%g.s} %A\n }}}}"},
  852.  #include "specs.h"
  853. @@ -714,7 +722,7 @@
  854.  /* Don't generate -L options.  */
  855.  static char *link_command_spec = "\
  856.  %{!fsyntax-only: \
  857. - %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  858. + %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{v} %{G} %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  859.              %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
  860.              %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
  861.              %{static:} %{L*} %o\
  862. @@ -726,14 +734,10 @@
  863.  /* Use -L.  */
  864.  static char *link_command_spec = "\
  865.  %{!fsyntax-only: \
  866. - %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  867. + %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{v} %{G} %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  868.              %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
  869. -            %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
  870. -            %{static:} %{L*} %D %o\
  871. -            %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
  872. -            %{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
  873. -            %{T*}\
  874. -            \n }}}}}}";
  875. +            %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\
  876. +            %{L*} %D %{T*} %o %{!nostdlib:%L %{!A:%E}}\n }}}}}}";
  877.  #endif
  878.  
  879.  /* A vector of options to give to the linker.
  880. @@ -2385,6 +2389,10 @@
  881.    int have_o = 0;
  882.    int lang_n_infiles = 0;
  883.  
  884. +#ifdef atarist
  885. +  gcc_exec_prefix = getenv ("GNUEXEC");
  886. +  if(gcc_exec_prefix == NULL)
  887. +#endif
  888.    gcc_exec_prefix = getenv ("GCC_EXEC_PREFIX");
  889.  
  890.    n_switches = 0;
  891. @@ -2476,8 +2484,12 @@
  892.      }
  893.      }
  894.  
  895. +#ifdef atarist
  896. +  temp = getenv ("GNULIB");
  897. +#else
  898.    /* Use LPATH like LIBRARY_PATH (for the CMU build program).  */
  899.    temp = getenv ("LPATH");
  900. +#endif
  901.    if (temp && *cross_compile == '0')
  902.      {
  903.        char *startp, *endp;
  904. @@ -3659,7 +3671,7 @@
  905.              /* Copy the whole option.  */
  906.              while (*y && *y != ' ' && *y != '\t')
  907.                *x++ = *y++;
  908. -          else if (*y == ' ' || *y == '\t')
  909. +          else if ((*y == ' ') || (*y == '\t'))
  910.              /* Copy whitespace to the result.  */
  911.              *x++ = *y++;
  912.            /* Don't copy other options.  */
  913. @@ -3945,13 +3957,21 @@
  914.          break;
  915.  
  916.        default:
  917. +#if 1 /* atarist */
  918. +        fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
  919. +        c, (p - spec - 1), spec);
  920. +#endif
  921.          abort ();
  922.        }
  923.      break;
  924.  
  925. +#ifndef atarist
  926. +      /* on the atari it is important to preserve backslash in spec */
  927. +      /* so just let it go into default case */
  928.        case '\\':
  929.      /* Backslash: treat next character as ordinary.  */
  930.      c = *p++;
  931. +#endif
  932.  
  933.      /* fall through */
  934.        default:
  935. @@ -4367,9 +4387,14 @@
  936.    char *p;
  937.    struct user_specs *uptr;
  938.  
  939. -  p = argv[0] + strlen (argv[0]);
  940. -  while (p != argv[0] && p[-1] != '/' && p[-1] != DIR_SEPARATOR) --p;
  941. -  programname = p;
  942. +  if (argv[0][0] == '\0')
  943. +       programname = "gcc";
  944. +  else
  945. +  {
  946. +    p = argv[0] + strlen (argv[0]);
  947. +    while (p != argv[0] && p[-1] != '/' && p[-1] != DIR_SEPARATOR) --p;
  948. +    programname = p;
  949. +  }
  950.  
  951.    if (signal (SIGINT, SIG_IGN) != SIG_IGN)
  952.      signal (SIGINT, fatal_error);
  953. @@ -4643,7 +4668,11 @@
  954.  
  955.        if (! strncmp (version_string, compiler_version, n)
  956.        && compiler_version[n] == 0)
  957. +#ifdef atarist
  958. +    fprintf (stderr, "gcc version %s.%s\n", version_string, ATARI_PL);
  959. +#else
  960.      fprintf (stderr, "gcc version %s\n", version_string);
  961. +#endif
  962.        else
  963.      fprintf (stderr, "gcc driver version %s executing gcc version %s\n",
  964.           version_string, compiler_version);
  965. diff -ur orig-2.8.1/toplev.c gcc-2.8.1/toplev.c
  966. --- orig-2.8.1/toplev.c    Thu Feb 26 02:04:46 1998
  967. +++ gcc-2.8.1/toplev.c    Tue Aug 11 16:06:54 1998
  968. @@ -81,6 +81,11 @@
  969.  #include "bc-emit.h"
  970.  #include "except.h"
  971.  
  972. +#ifdef atarist
  973. +#include <string.h>
  974. +long _stksize = 1L;    /* 1 means malloc from own heap and keep 1/4 of memory */
  975. +#endif
  976. +
  977.  #ifdef XCOFF_DEBUGGING_INFO
  978.  #include "xcoffout.h"
  979.  #endif
  980. @@ -3859,6 +3864,18 @@
  981.        else if (!strcmp (str, "dumpbase"))
  982.          {
  983.            dump_base_name = argv[++i];
  984. +#ifdef atarist
  985. +          /* dump_base_name will typically be 'foo.c' here.
  986. +             Need to truncate at the '.', cause dots mean 
  987. +             something here
  988. +           */
  989. +         {
  990. +            char * n = dump_base_name;
  991. +           for ( ; ((*n) && (*n != '.')) ; )
  992. +             n++;
  993. +           *n = '\0';
  994. +          }
  995. +#endif
  996.          }
  997.        else if (str[0] == 'd')
  998.          {
  999. @@ -4442,8 +4459,13 @@
  1000.       FILE *file;
  1001.       char *indent;
  1002.  {
  1003. +#ifdef atarist
  1004. +  fprintf (file, "%s%s%s version %s.%s", indent, *indent != 0 ? " " : "",
  1005. +       language_string, version_string, ATARI_PL);
  1006. +#else
  1007.    fprintf (file, "%s%s%s version %s", indent, *indent != 0 ? " " : "",
  1008.         language_string, version_string);
  1009. +#endif
  1010.    fprintf (file, " (%s)", TARGET_NAME);
  1011.  #ifdef __GNUC__
  1012.  #ifndef __VERSION__
  1013. @@ -4660,3 +4682,19 @@
  1014.      dwarf2out_undef (lineno, buffer);
  1015.  #endif /* DWARF2_DEBUGGING_INFO */
  1016.  }
  1017. +
  1018. +
  1019. +#ifdef atarist
  1020. +char *atari_filename_nondirectory(char *p)
  1021. +{
  1022. +    char *s;
  1023. +    
  1024. +    for(s = p + strlen(p); s != p; --s)
  1025. +    {
  1026. +       if((*s == '/') || (*s == '\\'))
  1027. +        break;
  1028. +    }
  1029. +    return (s == p) ? p : s+1;
  1030. +}
  1031. +
  1032. +#endif
  1033.